#!/bin/bash

num=3890
if [ -z "${num//[0-9]/}" -a $num == 3j890 ] ; then
    echo num all are interge
fi

fun()
{
local ip2=""
echo ${ip2:=hello}
}
fun
echo ${ip2:=hello j}
ip=192.168.1.180jjjjjj

echo $ip | sed -n  's/[a-z]\{1,3\}//'
echo $ip | sed -n 's/[0-9]\{1,3\}//'
exit
echo $ip | grep -E -v "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
echo "grep ret:"$?
#echo $ip | grep -E -v "[129]{1,3}."
echo "grep ret:"$?

#echo "ip:${ip/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/}"
echo "ip:${ip/[0-9]\{3\}/}"
echo "ip:${ip#[0-9]\{1,3\}}"
echo "ip test:${ip##*[192].}"

var=" j hello h"

var1=${var}
echo "var1:|$var1|"
var1=${var#*[eh] }

echo "var1:|$var1|"
#echo "yuanji.tech" | grep -E "[0-9a-zA-Z_]{1,128}\.[a-zA-Z]{1,5}"

#echo "yuanji.techckk" | sed 's/[0-9a-zA-Z_]\{1,128\}\.[a-zA-Z]\{1,5\}/jj/g' 
#echo "yuanji...tech" | sed 's/\.\{1,5\}[tech]\{1,5\}/jj/g' 

#if [[ "yuanji.0tech" =~ "[0-9a-zA-Z_]{1,128}\.[a-zA-Z]{1,5}" ]] ; then
#    echo "Jjjjjjjjjj"
#fi
exit 
source ./global.sh

#should_log_leve=error
log_level=debug

vlogi "hello world"
vlogi "hello" "world"
vlogi "hello " "world"

exit 
should_log debug
if [ $? ] ; then
    echo "jjjjjjj"
fi

show=true
parse_arguments "$@"

printf "hello world" "hello world"


#show=true
vlogi "hello world"
vlogi "hello" "world"
vlogi "hello " "world"

vlogi "[hello%8s] [%-8i] [%s]" "world"  80 hi
vlogi "hello" "world" "nice to you"
vloge "hello" "world" "nice to you"

var=false
show=true

if [ $var == "false" ] ; then
    vlogi $var
else
    vlogi "$varj"
fi


fun()
{
   echo "jjj:$@" 
}

#shopt -s expand_aliases
#shopt expand_aliases
#shopt -u expand_aliases

#new_fun="fun ${LINENO}"
#alias new_fun="fun(){echo jj};fun"
alias myls='vlogi $LINENO '

#new_fun 
#myls hello

echo $?
